﻿using System;
using System.Collections.Generic;
using System.Configuration;
using System.Linq;
using System.Text;
using Se.Extend;

namespace Se.Config
{
    /// <summary>
    /// Socket 配置（App.Config）
    /// </summary>
    public class SocketConfig : ConfigurationSection
    {
        ///// <summary>
        ///// 最大连接数
        ///// </summary>
        //[ConfigurationProperty("maxconnections", IsRequired = true)]
        //public int MaxConnections
        //{
        //    get { return (int)this["maxconnections"]; }
        //    set { this["maxconnections"] = value; }
        //}
        ///// <summary>
        ///// 接收消息长度
        ///// </summary>
        //[ConfigurationProperty("receivesize", DefaultValue = 8192, IsRequired = true)]
        //public int ReceiveBufferSize
        //{
        //    get { return (int)this["receivesize"]; }
        //    set { this["receivesize"] = value; }
        //}
        ///// <summary>
        ///// 发送消息长度
        ///// </summary>
        //[ConfigurationProperty("sendsize", DefaultValue = 8192, IsRequired = true)]
        //public int SendBufferSize
        //{
        //    get { return (int)this["sendsize"]; }
        //    set { this["sendsize"] = value; }
        //}
        [ConfigurationProperty("username", IsRequired = true)]
        public string UserName
        {
            get { return this["username"].ToString(); }
            set { this["username"] = value; }
        }

        [ConfigurationProperty("url", IsRequired = true)]
        public string Url
        {
            get { return this["url"].ToString(); }
            set { this["url"] = value; }
        }
    }
}
